let mapStatus = getLocalValue("mapStatus");
let DynamicLabel_plugins = getLocalValue("DynamicLabel_plugins");

console.log("mapStatusGeojson");
console.log(DynamicLabel_plugins);
var DynamicLabel = DynamicLabel_plugins["DynamicLabel"];
// 需要传入该参数，脚本内部不能访问 window对象；
// var d = window.devicePixelRatio;


var curZoom = data.zoom
var currentCenterLng = data.lng
var currentCenterLat = data.lat
var width = 4800;
var height = 1890;


console.time("计算偏移时间")

let offsetDatas = [
];

if (mapStatus.GeojsonDataBound) {
  console.log("地理边界数据", mapStatus.GeojsonDataBound);
  var dDynamicLabel = new DynamicLabel();
  var labels = dDynamicLabel.getLabels(currentCenterLng, currentCenterLat, curZoom, width, height, mapStatus.GeojsonDataBound);
  // area_id
  // clipGeo_center

  for (var i = 0; i < labels.length; i++) {
    var curLabel = labels[i];
    offsetDatas.push({
      "area_id": curLabel.area_id,
      "customLabelPosition": curLabel.clipGeo_center,
      "value": curLabel.area_id //根据情况进行修改对应value
    });
  }

  console.log("地理边界数据--计算后标注", labels);
} else {
  console.warn("地理边界数据未初始化！！！！");
}

console.timeEnd("计算偏移时间")

return offsetDatas; 